/**
 * Auth (login / recovery / security) — stone/gray palette
 * Matches News / Forum / Online / Store
 */

.box.type-auth,
.box.type-default:has(.auth.auth--stone) {
	--au-text: #d7d0c4;
	--au-muted: #8a8378;
	--au-accent: #b3a26e;
	--au-accent-soft: #d5c698;
	--au-gold: #e6c86a;
	--au-radius: 8px;
	--au-border: rgba(115, 109, 98, 0.35);
	--au-border-strong: rgba(179, 162, 110, 0.45);
	--au-shadow: 0 0 5px 0 rgba(0, 0, 0, 0.21), 0 1px 1px 0 rgba(0, 0, 0, 0.25);
	--au-card: linear-gradient(165deg, rgba(51, 49, 45, 0.92) 0%, rgba(25, 23, 20, 0.96) 100%);
	--au-panel: linear-gradient(165deg, rgba(40, 38, 34, 0.88) 0%, rgba(22, 20, 18, 0.94) 100%);

	position: relative;
	overflow: hidden;
	border: 1px solid var(--au-border) !important;
	border-radius: var(--au-radius) !important;
	background: var(--au-card) !important;
	box-shadow: var(--au-shadow) !important;
	animation: au-fade 0.4s ease;
}

@keyframes au-fade {
	from { opacity: 0; transform: translateY(6px); }
	to { opacity: 1; transform: none; }
}

.box.type-auth::before,
.box.type-default:has(.auth.auth--stone)::before {
	content: "";
	position: absolute;
	inset: 0 auto 0 0;
	width: 3px;
	background: linear-gradient(180deg, #d5c698, var(--au-accent));
	z-index: 2;
	pointer-events: none;
}

.box.type-auth::after,
.box.type-auth > [box-overlay],
.box.type-auth > [box-overlay]::before,
.box.type-auth > [box-overlay]::after,
.box.type-default:has(.auth.auth--stone)::after,
.box.type-default:has(.auth.auth--stone) > [box-overlay],
.box.type-default:has(.auth.auth--stone) > [box-overlay]::before,
.box.type-default:has(.auth.auth--stone) > [box-overlay]::after {
	pointer-events: none !important;
}

.box.type-auth > .box-head,
.box.type-default:has(.auth.auth--stone) > .box-head {
	position: relative;
	z-index: 9;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
	height: auto !important;
	min-height: var(--box-head-height, 48px);
	padding: 0.85rem 1.15rem !important;
	line-height: 1.25;
	font-size: 0.82rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #d5c698;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.65);
	background: linear-gradient(180deg, rgba(17, 17, 23, 0.55) 0%, rgba(17, 17, 23, 0.15) 100%) !important;
	border-bottom: 1px solid rgba(179, 162, 110, 0.18);
}

.box.type-auth > .box-head::before,
.box.type-auth > .box-head::after,
.box.type-default:has(.auth.auth--stone) > .box-head::before,
.box.type-default:has(.auth.auth--stone) > .box-head::after {
	content: "";
	flex: 1 1 0;
	max-width: 2.75rem;
	height: 1px;
}

.box.type-auth > .box-head::before,
.box.type-default:has(.auth.auth--stone) > .box-head::before {
	background: linear-gradient(90deg, transparent, rgba(179, 162, 110, 0.55));
}

.box.type-auth > .box-head::after,
.box.type-default:has(.auth.auth--stone) > .box-head::after {
	background: linear-gradient(90deg, rgba(179, 162, 110, 0.55), transparent);
}

.box.type-auth > .box-body,
.box.type-default:has(.auth.auth--stone) > .box-body {
	padding: 0.85rem 1rem 1.15rem !important;
	position: relative;
	z-index: 9;
	overflow: visible !important;
}

.box.type-auth,
.box.type-default:has(.auth.auth--stone) {
	overflow: visible !important;
}

.auth.auth--stone {
	width: 100%;
	color: var(--au-text, #d7d0c4);
	font-family: var(--font-family-primary, Calibri, system-ui, sans-serif);
}

.auth.auth--stone .page-subbody {
	padding: 0.15rem 0 0.35rem;
	background: transparent;
	box-shadow: none;
}

.auth.auth--stone .auth-panel {
	position: relative;
	overflow: hidden;
	padding: 1.1rem 1.15rem 1.2rem;
	border-radius: var(--au-radius, 8px);
	border: 1px solid var(--au-border, rgba(115, 109, 98, 0.35));
	background: var(--au-panel, linear-gradient(165deg, rgba(40, 38, 34, 0.88) 0%, rgba(22, 20, 18, 0.94) 100%));
	box-shadow: var(--au-shadow, 0 0 5px 0 rgba(0, 0, 0, 0.21));
}

.auth.auth--stone .auth-notice {
	margin: 0 0 1rem;
	padding: 0.7rem 0.85rem;
	border-radius: 6px;
	border: 1px solid rgba(179, 162, 110, 0.28);
	background: rgba(0, 0, 0, 0.22);
	color: var(--au-muted, #8a8378);
	font-size: 0.88rem;
	line-height: 1.45;
}

.auth.auth--stone .auth-notice a {
	color: var(--au-accent-soft, #d5c698);
	font-weight: 700;
	text-decoration: none;
	border-bottom: 1px solid rgba(179, 162, 110, 0.45);
}

.auth.auth--stone .auth-notice a:hover {
	color: #ebe3cf;
	border-bottom-color: #ebe3cf;
}

.auth.auth--stone .card-body {
	padding: 0;
	background: transparent;
}

.auth.auth--stone .login-checks {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 0.5rem;
}

.auth.auth--stone .login-checks .form-check {
	width: 100%;
	min-height: 1.5rem;
	margin-bottom: 0;
	padding-left: 1.75em;
}

.auth.auth--stone .login-checks .form-check-input {
	margin-top: 0.2em;
	background-color: rgba(0, 0, 0, 0.35);
	border-color: var(--au-border, rgba(115, 109, 98, 0.35));
}

.auth.auth--stone .login-checks .form-check-input:checked {
	background-color: var(--au-accent, #b3a26e);
	border-color: var(--au-border-strong, rgba(179, 162, 110, 0.45));
}

.auth.auth--stone .login-checks .form-check-input:focus {
	box-shadow: 0 0 0 0.15rem rgba(179, 162, 110, 0.2);
}

.auth.auth--stone .login-checks .form-check-label {
	line-height: 1.35;
	color: var(--au-text, #d7d0c4);
	font-size: 0.82rem;
	letter-spacing: 0.02em;
}

.auth.auth--stone .form-check-input.is-invalid {
	border-color: #a07870;
	box-shadow: 0 0 0 0.15rem rgba(160, 120, 112, 0.25);
}

.auth.auth--stone .input-group {
	border: 1px solid var(--au-border, rgba(115, 109, 98, 0.35));
	border-radius: 6px;
	overflow: hidden;
	background: rgba(0, 0, 0, 0.28);
}

.auth.auth--stone .input-group.border-danger {
	border-color: rgba(160, 120, 112, 0.7) !important;
}

.auth.auth--stone .input-group .input-group-text {
	background: rgba(0, 0, 0, 0.22);
	border: none;
	color: var(--au-accent-soft, #d5c698);
	justify-content: center;
}

.auth.auth--stone .input-group .form-control,
.auth.auth--stone .page_form input[type="email"],
.auth.auth--stone .page_form input[type="text"],
.auth.auth--stone .page_form input[type="password"] {
	background: transparent;
	border: none;
	color: #fff !important;
	-webkit-text-fill-color: #fff;
	caret-color: #fff;
	box-shadow: none;
}

.auth.auth--stone .input-group .form-control::placeholder,
.auth.auth--stone .page_form input::placeholder {
	color: #fff !important;
	-webkit-text-fill-color: #fff;
	opacity: 1;
}

.auth.auth--stone .input-group .form-control:focus,
.auth.auth--stone .page_form input[type="email"]:focus,
.auth.auth--stone .page_form input[type="text"]:focus,
.auth.auth--stone .page_form input[type="password"]:focus {
	color: #fff !important;
	-webkit-text-fill-color: #fff;
	box-shadow: none;
	outline: none;
}

.auth.auth--stone .form-floating label {
	color: var(--au-muted, #8a8378);
}

.auth.auth--stone .card-link {
	color: var(--au-accent-soft, #d5c698);
	font-size: 0.82rem;
	text-decoration: none;
}

.auth.auth--stone .card-link:hover {
	color: #ebe3cf;
}

.auth.auth--stone .error-feedback,
.auth.auth--stone .alert-danger {
	background: rgba(160, 120, 112, 0.14);
	border: 1px solid rgba(160, 120, 112, 0.4);
	color: #e0b8b2 !important;
	border-radius: 6px;
	padding: 0.55rem 0.75rem;
	margin-bottom: 0.85rem;
	font-size: 0.85rem;
}

.auth.auth--stone .nice_button,
.auth.auth--stone input[type="submit"].nice_button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 10rem;
	height: 2.45rem;
	padding: 0 1.25rem;
	border-radius: 6px !important;
	border: 1px solid rgba(179, 162, 110, 0.45) !important;
	background: linear-gradient(145deg, #d5c698, #b3a26e) !important;
	color: #1f1d18 !important;
	font-size: 0.72rem !important;
	font-weight: 750 !important;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	box-shadow: none !important;
	text-shadow: none !important;
}

.auth.auth--stone .nice_button:hover,
.auth.auth--stone input[type="submit"].nice_button:hover {
	filter: brightness(1.08);
	color: #1f1d18 !important;
}

.auth.auth--stone .page_form h4 {
	color: var(--au-accent-soft, #d5c698);
	letter-spacing: 0.08em;
	font-size: 0.92rem;
}

.auth.auth--stone .page_form p,
.auth.auth--stone .page_form label {
	color: var(--au-muted, #8a8378);
}

.auth.auth--stone .page_form input[type="email"],
.auth.auth--stone .page_form input[type="text"],
.auth.auth--stone .page_form input[type="password"] {
	width: 100%;
	height: 2.35rem;
	padding: 0 0.75rem;
	border-radius: 6px;
	border: 1px solid var(--au-border, rgba(115, 109, 98, 0.35));
	background: rgba(0, 0, 0, 0.28);
}

.auth.auth--stone .otp input {
	background: rgba(0, 0, 0, 0.35);
	border: 1px solid var(--au-border, rgba(115, 109, 98, 0.35));
	color: var(--au-accent-soft, #d5c698);
	border-radius: 6px;
}

.auth.auth--stone .otp input:focus {
	border-color: var(--au-border-strong, rgba(179, 162, 110, 0.45));
	outline: none;
}

@media (max-width: 768px) {
	.auth.auth--stone .auth-panel {
		padding: 0.9rem 0.85rem 1rem;
	}
}
